using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Handgun : Weapon
{
    // Start is called before the first frame update
    void Start()
    {
        mass = 1;
        fireSpeed = 1f;
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public override void Fire(Transform Bullet ,Vector2 vec, float lastFireTime)
    {
        if (Time.time - lastFireTime < 1 / fireSpeed) return;
        else GameObject.Find("Player").GetComponent<Player>().lastFireTime = Time.time;
        Instantiate(Bullet, GameObject.Find("Player").transform,false);
    }
}
